/*
 * @Author: cmd 
 * @wechat: cmd_develop 
 * @Date: 2019-05-08 22:57:57 
 * @Last Modified by: cmd
 * @Last Modified time: 2019-05-08 23:50:10
 * @Description: 
 */

const {ccclass, property} = cc._decorator;

@ccclass
export default class NewClass extends cc.Component {

    @property(cc.Node)
    body1:cc.Node = null;
    
    @property(cc.Node)
    body2:cc.Node = null;    

    @property(cc.Node)
    snake:cc.Node = null;    

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {}

    start () {

    }

    btn_big(){
        console.log('this.snake.scale:',this.snake.getScale());
        this.snake.setScale(this.snake.getScale()+0.1);
        console.log('this.snake.scale:',this.snake.getScale());
        console.log('this.body1:',this.body1.getPosition());
        console.log('this.body2:',this.body2.getPosition());
        let asd = this.body1.getPosition();
        this.body1.setPosition(this.body1.getPosition().mul(1/1.1));
        this.body2.setPosition(this.body2.getPosition().mul(1/1.1));
    }

    

    // update (dt) {}
}
